/*
 * Copyright (C) 2018 Donlon.
 *
 * 2018秋季C语言练习题（1）
 * http://10.105.242.83/contest/412/
 *
 * B. 求阶乘（可用循环实现）
 */

#include <stdio.h>

unsigned int recusive_get_produce(unsigned int);

int main() {
    int n;
    scanf("%d", &n);
    printf("%d", recusive_get_produce(n));
}

unsigned int recusive_get_produce(unsigned int index){
    return (index == 0 || index == 1)? 1 : recusive_get_produce(index - 1) * index;
}
